<?php
	error_reporting(0);
	if(file_exists('./install/ok.lock')){
		require('./config/config.php');
		echo "<!DOCTYPE html>
		<html lang='zh-cn'>
  		<head>
    	<meta charset='utf-8'>
    	<meta http-equiv='X-UA-Compatible' content='IE=edge'>
    	<meta name='viewport' content='width=device-width, initial-scale=1'>
    	<title>$web_title</title>
    	<link href='style/css.css' rel='stylesheet'>
  		</head>
  		<body>
    	<div class='container'>
		<div class='col-xs-0 col-sm-0 col-md-2 col-lg-2'></div>
		<div class='col-xs-12 col-sm-12 col-md-8 col-lg-8'>
	    <div class='panel text-center'>
		<div class='panel-heading'>
		 <h2>$web_title</h2>";
	}else {
		echo "<!DOCTYPE html>
		<html lang='zh-cn'>
		<head>
		<meta charset='utf-8'>
		<meta http-equiv='X-UA-Compatible' content='IE=edge'>
		<meta name='viewport' content='width=device-width, initial-scale=1'>
		<title>说说评论系统</title>
		<link href='style/css.css' rel='stylesheet'>
		</head>
		<body>
		<div class='container'>
		<div class='col-xs-0 col-sm-0 col-md-2 col-lg-2'></div>
		<div class='col-xs-12 col-sm-12 col-md-8 col-lg-8'>
		<div class='panel text-center'>
		<div class='panel-heading'>
		<h2>说说评论系统</h2>";
	}
			if(!$_COOKIE['name']){
		    echo "<a class='btn btn-info' type='button' href='login.php'>登录</a>
		    		<a class='btn btn-info' type='button' href='reg.php'>注册</a>
		    		<button class='btn btn-info' data-toggle='modal' data-target='#myModal'>搜索</button>
			<!-- 对话框HTML -->
			<div class='modal fade' id='myModal'>
			<div class='modal-dialog'>
			<div class='modal-content'>
			<div class='modal-header'>
			<button type='button' class='close' data-dismiss='modal'><span aria-hidden='true'>×</span><span class='sr-only'>关闭</span></button>
			<h4 class='modal-title'>查询</h4>
			</div>
			<div class='modal-body'>
			<form action='search.php' method='post'>
			<div class='has-success col-xs-6 col-sm-6 col-md-6 col-lg-6'>
			<input type='text' class='form-control' placeholder='查找文章' name='search'>
			</div>
			<div class='col-xs-6 col-sm-6 col-md-6 col-lg-6'>
			<input type='submit' class='btn btn-danger' value='搜索'>
			</div>
			</form>
			<br/><br/>
			<div class='modal-footer'>
			<button type='button' class='btn btn-default' data-dismiss='modal'>取消</button>
			</div>
			</div>
			</div>
			</div>
			</div>";
			}else{
			  echo "<a class='btn btn-info' type='button' href='./admin'>发布</a>
			  		<a class='btn btn-info' type='button' href='logout.php'>注销</a>
			  		<button class='btn btn-info' data-toggle='modal' data-target='#myModal'>搜索</button>
			<!-- 对话框HTML -->
			<div class='modal fade' id='myModal'>
			<div class='modal-dialog'>
			<div class='modal-content'>
			<div class='modal-header'>
			<button type='button' class='close' data-dismiss='modal'><span aria-hidden='true'>×</span><span class='sr-only'>关闭</span></button>
			<h4 class='modal-title'>查询</h4>
			</div>
			<div class='modal-body'>
			<form action='search.php' method='post'>
			<div class='has-success col-xs-6 col-sm-6 col-md-6 col-lg-6'>
			<input type='text' class='form-control' placeholder='查找文章' name='search'>
			</div>
			<div class='col-xs-6 col-sm-6 col-md-6 col-lg-6'>
			<input type='submit' class='btn btn-danger' value='搜索'>
			</div>
			</form>
			<br/><br/>
			<div class='modal-footer'>
			<button type='button' class='btn btn-default' data-dismiss='modal'>取消</button>
			</div>
			</div>
			</div>
			</div>
			</div>";
			}
		    ?>  
		</div>